<template>
    <div id="empty" :style="{'margin-top':marginTop}">
        <div class="ico" v-if="type === 'empty'">
            <svg class="icon"><use xlink:href="#icon-kong"></use></svg>
        </div>
        <div class="loading" v-if="type === 'loading'">
            <cube-loading class="loading-loading" :size="60"></cube-loading>
        </div>
        <p><slot>空列表</slot></p>
    </div>
</template>

<script>
    export default {
        data(){
            return {
                height:0
            }
        },
        props:{
            marginTop:{
                default:'50%',
                type:String
            },
            type:{
                default: "empty",
                type:String
            }
        },
        mounted() {
            this.height = document.documentElement.clientHeight;
        }
    }
</script>

<style scoped lang="less" src="./empty.less"></style>

<style lang="stylus">
    #empty .cube-loading-spinners
        margin 0 auto
</style>